<?php
    namespace app\listen\model;
    use think\Exception;

    class Member extends \app\listen\model\Base {
        function findMemberByOpenId(string $openid):?Member {
            return $this->where(['openid'=>$openid])->find();
        }
        function findMemberByUId($uid): ?Member {
            return $this->where(['uid'=>$uid])->find();
        }
        function add(array $data) {
            try {
                return $this->save($data);
            } catch (Exception $e) {
                return null;
            }
        }
    }